package com.jinlia.show.modules.wxapp.service;

import com.jinlia.show.modules.base.constant.EnableStatusEnum;
import com.jinlia.show.modules.base.system.entity.DeliveryOrder;
import com.jinlia.show.modules.base.system.service.DeliveryOrderMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class NewsService {

    @Autowired
    DeliveryOrderMapperService deliveryOrderMapperService;
//
//    public HashMap getTodoOrder(Long userId) {
//        //待发货
//        Long todoDeliver = deliveryOrderMapperService.lambdaQuery()
//                .eq(DeliveryOrder::getEnableStatus, EnableStatusEnum.ENABLE.getValue())
//                .in(DeliveryOrder::getDeliveryStatus,
//                        DeliveryStatusEnum.WAIT_CONFIRM.getValue(),//待确认
//                        DeliveryStatusEnum.MAKING.getValue(),//制作中
//                        DeliveryStatusEnum.WAIT_DELIVERY.getValue(),//堂食待取
//                        DeliveryStatusEnum.WAIT_ERRAND.getValue(),//外卖待取
//                        DeliveryStatusEnum.WAIT_ERRAND222.getValue())//自配发货
//                .count();
//        //待收货
//        Long todoReceiving = deliveryOrderMapperService.lambdaQuery()
//                .eq(DeliveryOrder::getEnableStatus, EnableStatusEnum.ENABLE.getValue())
//                .in(DeliveryOrder::getDeliveryStatus,
//                        DeliveryStatusEnum.ARRIVED.getValue(),
//                        DeliveryStatusEnum.ON_WAY.getValue())//再途中
//                .count();
//        //待收货
//        Long todoPay = deliveryOrderMapperService.lambdaQuery()
//                .eq(DeliveryOrder::getEnableStatus, EnableStatusEnum.ENABLE.getValue())
//                .in(DeliveryOrder::getDeliveryStatus,
//                        DeliveryStatusEnum.INIT.getValue())//再途中
//                .count();
//        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
//        objectObjectHashMap.put("todoDeliver",todoDeliver);
//        objectObjectHashMap.put("todoReceiving",todoReceiving);
//        objectObjectHashMap.put("todoPay",todoPay);
//        return objectObjectHashMap;
//
//    }
}
